Field of the Invention
This invention relates to solid-state storage and more particularly relates to recovery of storage space in solid-state storage.
Description of the Related Art
Data storage devices are write-in-place random access in that data accessed at a particular location can be modified and then put back in the same location. A file or object may be divided and placed piecemeal in the data storage device in various locations where no data is stored or where data is marked invalid. While this method works well for devices such as a hard disk drive (“HDD”), using write-in-place for solid-state storage can be inefficient and can cause premature failure.
Using write-in-place for solid-state storage can be inefficient because typically writing data often takes much longer than reading data. For flash memory, which is a type of solid-state storage, changing a bit from a “zero” state (“zero”) to a “one” state (“one”) usually takes longer than changing a bit from a one to a zero. This is the case for typical flash memory that uses capacitors as cells where a zero equates to a discharged capacitor in a cell and a one equates to a charged capacitor in a cell. Typically, charging a capacitor takes longer than discharging a capacitor.
Using write-in-place for solid-state storage can lead to premature failure of the solid-state storage because typically each cell in a solid-state storage device can only be written to a certain number of times before the cell begins to fail. Write-in-place typically does not evenly distribute writing data over the solid-state storage so some regions or addresses are used much more than other areas. This overuse of some areas can lead to premature failure of all or a portion of a solid-state storage device.
Typical solid-state storage devices recover un-used storage space much the same way as non-solid-state storage by treating the solid-state storage device as write-in-place and marking unused storage space as available for reuse. This is problematic because the typical storage space recovery methods applied to solid-state storage suffers the inefficiencies and failure tendencies as described above.